-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Editor: Use the correct icon for Patterns in sidebar card #52931
Conversation
return { | ||
title: info.title, | ||
description: info.description, | ||
icon: info.icon, | ||
record: _record, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored the return values a bit. The info
will never have a stable reference, so it's better to return values directly.
@@ -7,7 +7,7 @@ import { store as editorStore } from '@wordpress/editor'; | |||
import { store as coreStore } from '@wordpress/core-data'; | |||
import { decodeEntities } from '@wordpress/html-entities'; | |||
import { __ } from '@wordpress/i18n'; | |||
import { navigation as navigationIcon } from '@wordpress/icons'; | |||
import { navigation, symbol } from '@wordpress/icons'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we always use the Icon
suffix, or can we omit it when there's no name collision?
Size Change: +35 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is working well for me. Template parts (of all areas), patterns, and navigation menus now all display the correct icon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor and update.
What?
Fixes #52924.
PR fixes the icon for Patterns in the site editor's sidebar card.
How?
Create a map for record types and icons that need special handling.
Testing Instructions
Screenshots or screencast